<?php
class JobselectForm extends BaseForm {
	private $jobId; 
	private $jobName;
	private $albums;
	private $albumId; 
	private $pictures;
	private $selectedPictures; 
	private $jobPictures;
	private $selectedJobPictures; 
	   
	
	public function JobselectForm() {
		parent::BaseForm();
	}
	
	public function clear(){
		$this->jobId = null; 
		$this->jobName = null;
		$this->albums = array();
		$this->albumId = null; 
		$this->pictures = array();
		$this->selectedPictures = array(); 
		$this->jobPictures = array();
		$this->selectedJobPictures = array(); 
	}
	
	public function getJobId(){ return $this->jobId; } 
	public function getJobName(){ return $this->jobName; }
	public function getAlbums(){ return $this->albums; }
	public function getAlbumId(){ return $this->albumId; } 
	public function getPictures(){ return $this->pictures; }
	public function getSelectedPictures(){ return $this->selectedPictures; } 
	public function getJobPictures(){ return $this->jobPictures; }
	public function getSelectedJobPictures(){ return $this->selectedJobPictures; } 
	
	public function setJobId($val){ $this->jobId  = $val ;} 
	public function setJobName($val){ $this->jobName  = $val ;}
	public function setAlbums($val){ $this->albums  = $val ;}
	public function setAlbumId($val){ $this->albumId  = $val ;} 
	public function setPictures($val){ $this->pictures  = $val ;}
	public function setSelectedPictures($val){ $this->selectedPictures  = $val ;} 
	public function setJobPictures($val){ $this->jobPictures  = $val ;}
	public function setSelectedJobPictures($val){ $this->selectedJobPictures  = $val ;}

	public function removeJobPictures($ids){
		$ids = array_flip($ids);
		$arr = array(); 
		
		foreach($this->jobPictures as $current){
			
			if(! array_key_exists($current, $ids)){
				$arr[] = $current;
			}
		} // foreach
		
		$this->jobPictures = $arr;
		
	}

	public function addJobPictures($ids){
		foreach($ids as $id){
			$this->jobPictures[] = $id;
		}
	}
	
} 
?>